<template>
  <radio-group class="flex items-middle flex-wrap" @change="radioChange">
    <label
      class="flex items-middle"
      style="margin: 5px;"
      v-for="(k, index) in radioList"
      :key="k.optionId"
    >
      <view>
        <radio :value="k.optionId" />
      </view>
      <view>{{k.optionName}}</view>
    </label>
  </radio-group>
</template>
<script>
export default {
  props: {
    radioList: {
      type: Array,
      default: () => []
    },
    itemInfo: {
      type: Object,
      default: {}
    }
  },
  methods: {
    radioChange(e) {
      this.$emit("radioChange", e.detail.value, this.itemInfo);
    }
  }
};
</script>